#ifndef PAGEBYPASS_H
#define PAGEBYPASS_H

#define ROWSINCOL 7

#include <QWidget>
#include <QLabel>
#include "global_def.h"

namespace Ui {
class PageBypass;
}



class PageBypass : public QWidget
{
    Q_OBJECT

public:
    explicit PageBypass(QWidget *parent = nullptr);
    ~PageBypass();
    enum{
        ByPASS_PEBPS,
        BYPASS_BIS,
        ByPASS_ATPFS,
        BYPASS_DBPS,
        BYPASS_DMBPS,
        BYPASS_LMRGBS,
        BYPASS_PBRBS,
        BYPASS_ABRBS,
        BYPASS_OBS,
        BYPASS_HLIS,
        BYPASS_BDMS,
        BYPASS_HTS,
        ByPASS_EBBPK,
        ByPassCnt
    };
    void setBypassStat(int bypass,int index,int stat);
private slots:
    void on_Btn_Return_clicked();
signals:
    void signal_go_back();
    void signal_one_bypass_act(bool);
private:
    Ui::PageBypass *ui;

private:
    QList<QList <QLabel*> > m_lBypass;
    QList<uint8_t> m_lBypassStat;
    QStringList m_lBypassName;
    uint m_nTopSpace;
    uint m_nBottomSpace;
    uint m_nHSpace;
    uint m_nVSpace;
    uint m_nSideSpace;
    uint m_nNameLabelLen;
    uint m_nStatLabelLen;
    uint m_nLabelHeight;
    uint m_nAreaWidth;
    uint m_nAreaHeight;
    uint m_nStartx,m_nStarty;
private:
    void InitBypass();
};

#endif // PAGEBYPASS_H
